ChoiceValidator

a validated set of choices.

This is only an EntryValidator, used in Lists and Maps to define the valid new choices you can make

Author

fzzyhmstrs since 0.2.0

Parameters

predicate

a ValuesPredicate that defines the valid choices the user can make

Constructors

Link copied to clipboard
constructor(predicate: ChoiceValidator.ValuesPredicate<T>)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class ValuesPredicate<T>(disallowedValues: List<T>?, allowableValues: List<T>?) : Predicate<T>

Functions

Link copied to clipboard
fun <N> convert(disallowedConverter: Function<in T, N>?, allowableConverter: Function<in T, N>?): ChoiceValidator<N>
Link copied to clipboard

Validates an input per the provided validation type.